/*
 * Copyright (C) 2007-2012 Geometer Plus <contact@geometerplus.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 */

package org.geometerplus.zlibrary.ui.android.view.animation;

import android.graphics.Bitmap;
import android.graphics.Canvas;

import com.example.administrator.fangbook.read.view.readView.ZLAndroidWidget;

import org.geometerplus.zlibrary.core.view.ZLViewEnums;

class NoneAnimationProvider extends BaseAnimationProvider {


    NoneAnimationProvider(ZLAndroidWidget widget, AnimationManager bitmapManager) {
        super(widget, bitmapManager);
    }

    /**
     * 绘制
     *
     * @param canvas
     */
    @Override
    public void onDraw(Canvas canvas) {
        drawStatic(canvas);
    }

    @Override
    protected void preparePaintInfo() {
        if (mCurrentPageBitmap == null) {
            prepareCurrentPagePaintInfo();
            //从bitmapManager中获取当前bitmap
            mCurrentPageBitmap = getPagePaintedBitmap(ZLViewEnums.PageIndex.current);
        }
    }

//
//    @Override
//    public boolean onPressDown(int x, int y) {
//        return super.onPressDown(x, y);
//    }
//
//    @Override
//    public boolean onMove(int x, int y) {
//        return super.onMove(x, y);
//    }
//
//
//    @Override
//    public boolean onRelease(AnimationFling fling, int x, int y) {
//        int pressedX = (int) mTouched.x, pressedY = (int) mTouched.y;
//
//        if (pressedX < 0 || pressedY < 0) {
//            return true;
//        }
//        boolean isForward = false;
//        if (pressedX > x || pressedX > mWidget.getWidth() / 2) {
//            myDirection = PageDirection.Direction_forward;
//            isForward = true;
//        } else if (pressedX < x || pressedX < mWidget.getWidth() / 2) {
//            myDirection = PageDirection.Direction_backward;
//            isForward = false;
//        } else {
//            myDirection = PageDirection.Direction_none;
//        }
//
//        myAnimationMgr.turnPage(isForward);
//        return true;
//    }
//
//
//    @Override
//    protected boolean doUpdate() {
//        return false;
//    }
//
//
//    @Override
//    protected void setSize(int w, int h) {
//
//    }
//
//    @Override
//    protected int getScrollSpeed() {
//        return 0;
//    }
//
//    @Override
//    protected int getMaxFrameRate() {
//        return 1;
//    }
}

